$(document).ready(function() {
	var viewmode = 0;
	function checkScreenWidth() {
		var width = $(window).width();
		if (($(window).width()>=1024)) {
			viewmode = 0;
		} else {
			viewmode = 1;
		}
	}
	function changeViewMode() {
		if (viewmode == 0) {
			$('.content').css('width', '480px');
		} else {
			$('.content').css('width', '100%');
		}
		$('.main').css('height', $(window).height());
	}
	function initView() {
		headerheight = $('.header').height();
		$('.headerbutton').height(headerheight/2);
		height = $('.headerbutton').height();
		margin = (headerheight - height) / 2;
		$('.headerbutton').css('margin-top', margin);
		$('.headerbutton').css('font-size', height/2);
		$('.infobutton').width(headerheight/2);
		$('.infobutton').height(headerheight/2);
		margin = (headerheight - height) / 2;
		$('.infobutton').css('margin-top', "-6%");
		h = $('.auditicon').height();
		$('.info').css('margin-top', -h);
		$('.label').css('font-size', headerheight/4);
		
		$('.headertitle').css('font-size', headerheight/4);
		height = $('.headertitle').height();
		margin = (headerheight - height) / 2;
		$('.headertitle').css('padding-top', margin);
		$('.contentsection').css('min-height',$('.contentbody').height() / 2);
	}
	checkScreenWidth();
	changeViewMode();
	initView();
	auditlogin();
});